#!/usr/bin/env python
# -*- coding: utf-8 -*-

import requests

url = 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1585584328750&di=abd56be7a771544e55e1ef54123d0d43&imgtype=0&src=http%3A%2F%2Fn.sinaimg.cn%2Fsinacn%2F20%2Fw720h900%2F20180720%2F3b52-hfnsvzc2263553.jpg'
r = requests.get(url)  # 向图地址发送Get请求
print(r.content)  # content属性来获取二进制的响应

with open('xiaojiejie.jpg', 'wb') as f:
    f.write(r.content)  # 把二进制的数据写入xiaojiejie.jpg文件中
